package com.wthink.hzgj.view

import android.app.Dialog
import android.content.Context
import android.view.Gravity
import android.view.View
import android.view.ViewGroup
import com.wthink.hzgj.R
import kotlinx.android.synthetic.main.quit_login_dialog.*

class QuitLoginDialog : Dialog{
    constructor(context: Context) : this(context,0)
    constructor(context: Context, themeResId: Int) : super(context, R.style.dialog){
        setContentView(R.layout.quit_login_dialog)
        window?.setGravity(Gravity.CENTER)
        window?.setLayout(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT)
    }

    fun setOnclickListener(listener: View.OnClickListener){
        if (login_quit !== null){
            login_quit.setOnClickListener(listener)
        }
        if (login_sure !== null){
            login_sure.setOnClickListener(listener)
        }
    }
}